package com.template.app.utils;

import com.template.app.bean.SessionUser;

import javax.servlet.http.HttpServletRequest;


public class SessionUtil {
	
	public static final String SESSION_KEY = "ERP_USER_SESSION";
	
	public static SessionUser getSessionUser(HttpServletRequest request){
		//HttpSession session = request.getSession(true);
       // SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUtil.SESSION_KEY);
        SessionUser sessionUser = new SessionUser();
        sessionUser.setUserId((long) 1);
        sessionUser.setUserName("testUser");
        sessionUser.setPhone("13049494949");
        sessionUser.setRolesId(1009L);
        sessionUser.setRolesName("人事经理");
        sessionUser.setDepartmentId(1L);
        sessionUser.setDepartmentName("测试部");
        return sessionUser;
    }
}
